<!DOCTYPE >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>基本设置</title>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/system/css/right.css">
<script type="text/javascript" src="__PUBLIC__/system/js/jquery.js"></script>
<script type="text/javascript" src="__PUBLIC__/system/js/system.js"></script>
<script type="text/javascript" src="__PUBLIC__/system/js/ajaxupload.js"></script>
</head>
<body>
	<div class="basic bor">
			<div class="title fl">当前位置：招商报名</div>
			<div class="basic_r fr"><a href="setting.html">基本信息</a></div>
	</div> 

<form  id = "J_all_delete"  method="post" action="{:U('Attract/deleteAttract')}"  enctype="multipart/form-data" >
<table border="1"  class="table table-hover text-center" id='list'>
  <tr class="trcolor">
    <td>序号</td>
    <td>姓名</td>
   	<td>联系电话</td>
	  <td>省份</td>
    <td>城市</td>
    <td>意向</td>
    <td>创建时间</td>
    <td>操作</td>
  </tr>
<!-- ============================================================= -->

<volist name = 'lists' id = 'vo'>
  <tr>
    <td><input class="checkbox bor" name="id[]" type="checkbox" value="{$vo.id}" /></td>
    <td>{$vo.name}</td>
    <td>{$vo.tel}</td>
    <td>{$vo.province}</td>
    <td>{$vo.city}</td>
    <td>{$vo.purpose}</td>
    <td><?php echo date('Y-m-d H:i:s',$vo['ctime']); ?></td>
    <td><span class="addname"><a href="{:U('Attract/deleteAttract',array('id'=>$vo['id']))}">删除</a></span></td>
  </tr>
</volist>
<!-- ============================================================= -->
<input type="hidden" id = "J_ids"  value = "{$vo.id}">
</table>
<div class="pages">
   <span class="allxz fl"><input class="checkbox bor" id="all"  name="Fruit" type="checkbox" value=" " /></span> 
   <div class="deladd fl"><a href="javascript:;" class="alllist"  >全选</a><a href="javascript:;" class="color08bcbb" id = "J_delete">删除所选</a></div>
   
    <div class="page_s fr">{$page}</div>
</div>
</form>
<!-- 提示 -->
<p class="ts"><span class="colorf00">*</span><span class="ts_text">  如果要修排序/公司名称/连接请直接点击文字修改，图片直接点击上传更换。</span></p>
</body>
<script>
    $('#J_delete').click(function(){
     $("#J_all_delete").submit();
    });

 
   function edit(id,name){ 
       var url= "{:U('Parner/editLink')}";
       var i = $('[name_id='+name+']').val(); 
       $.ajax({
            type: 'POST',
            url: url,
            data: {id:id,name:name,value:i},
            dataType: 'json',
            async : false,
            success: function(res){
            if(res.status ==1){
                return;
            }else{
                alert('修改失败');
            }
       }
       });
  
   }
</script>
<script type="text/javascript">
var oBtn =$('#J_ids');
 function editPic(id){
    oBtn = document.getElementById("unloadPic_"+id);
      new AjaxUpload(oBtn,{
        action : "/System/Parner/Ajax_Upload/id/"+id,
        name:"pic",
        onSubmit:function(file,ext){
            if(ext && /^(jpg|jpeg|png)$/.test(ext)){
                //oBtn.disabled = "disabled";
            }else{  
                oRemind.style.color = "#ff3300";
                //oRemind.innerHTML = "不支持非图片格式！";
                return false;
            }
        },  
        onComplete:function(file,response){ 
            var res = JSON.parse(response); 
          if(res.status == 1){
              window.location.reload();
          }else{
              alert('上传图片过大，请重新上传');
          }
        }
    });
 }
 // var oBtn = document.getElementById("unloadPic");
      //上传图片
  
  
 </script>
</html>